package food;


import java.awt.Point;
import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;

/**
 * 
 * @author Steel Magnolias
 * Nathalie GLAD
 * Ailin MORENO
 * 
 * Type de nourriture
 *
 */
public class HiddenFood extends Food {
	
	/**
	 * @param p Position 
	 */
	public HiddenFood(Point p){
		super(p);
		BufferedImage img;
		try {
			img = ImageIO.read(this.getClass().getResource("hiddenFood.png"));
		} catch (IOException e) {
			e.printStackTrace();
			img = null;
		}
        this.representation = img;
        this.setFoodState(HIDDEN_FOOD);
	}

	@Override
	public void foodStateChange() {
		this.setFoodState(Food.VISIBLE_FOOD);
		BufferedImage img;
		try {
			img = ImageIO.read(this.getClass().getResource("food.png"));
		} catch (IOException e) {
			e.printStackTrace();
			img = null;
		}
        this.representation = img;
	}

}
